SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.framework.util
Class ResponseAPDU

java.lang.Object
  extended byjp.co.ricoh.dsdk.scard.framework.util.APDU
      extended byjp.co.ricoh.dsdk.scard.framework.util.ResponseAPDU

public class ResponseAPDU
extends APDU

Represents a response received from the smart card in response to a previous requestAPDU .


Field Summary
 
Fields inherited from class jp.co.ricoh.dsdk.scard.framework.util.APDU
buffer
 
Constructor Summary
ResponseAPDU(APDU apdu)
          Create a new ResponseAPDU and initializes it with given APDU .
ResponseAPDU(byte[] apdu)
          Create a new ResponseAPDU and initializes it with given bytes .
 
Method Summary
 byte[] data()
          Get string of bytes received in the data field of the response .
 int statusWords()
          Get the status words as an int value .
 byte sw1()
          Get the status word 1 .
 byte sw2()
          Get the status word 2 .
 
Methods inherited from class jp.co.ricoh.dsdk.scard.framework.util.APDU
append, append, equals, getByte, getLength, hashCode, setByte, setLength, toBytes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseAPDU

public ResponseAPDU(APDU apdu)
             throws APDUException
Create a new ResponseAPDU and initializes it with given APDU .

Parameters:
apdu - the APDU to be used for holding the APDU .
Throws:
APDUException - When ResponseAPDU is not initialized correctly, this exception will be thrown .

ResponseAPDU

public ResponseAPDU(byte[] apdu)
             throws APDUException
Create a new ResponseAPDU and initializes it with given bytes .

Parameters:
apdu - the byte array to be used for holding the APDU .
Throws:
APDUException - When ResponseAPDU is not initialized correctly, this exception will be thrown .
Method Detail

statusWords

public int statusWords()
Get the status words as an int value .

Returns:
status words

sw1

public byte sw1()
Get the status word 1 .

Returns:
status word 1 .

sw2

public byte sw2()
Get the status word 2 .

Returns:
status word 2 .

data

public byte[] data()
Get string of bytes received in the data field of the response .

Returns:
the data field of the response .

SDK/J Authentication Package ver1.0
RICOH Confidential